<%@ Page Title="" MasterPageFile="~/BackOffice.master" Language="C#" AutoEventWireup="true"
    CodeBehind="CadastroTituloPagRec.aspx.cs" Inherits="MakeIT.SGI.ERP.Apresentacao.CadastroTituloPagRec" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="cHeadHttpEquiv" ContentPlaceHolderID="headHttpEquiv" runat="server">
</asp:Content>
<asp:Content ID="cHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cCadastro" ContentPlaceHolderID="cphTituloCadastro" runat="server">
    Cadastro de T&iacute;tulo&nbsp;a&nbsp;Receber (titrec)
</asp:Content>
<asp:Content ID="cMain" ContentPlaceHolderID="cphMain" runat="server">
    <asp:UpdatePanel ID="upnTitrec" runat="server">
        <ContentTemplate>
            <asp:TabContainer ID="tabTitulo" runat="server" ActiveTabIndex="0">
                <asp:TabPanel runat="server" HeaderText="T&iacute;tulos&nbsp;a&nbsp;Pagar:" ID="TabPanel2">
                    <ContentTemplate>
                        <!-- pagar sub categorias -->
                        <asp:TabContainer ID="tabTitpag" runat="server" ActiveTabIndex="0" CssClass="">
                            <asp:TabPanel ID="tabPesquisa" runat="server" HeaderText="Pesquisa">
                                <ContentTemplate>
                                    <div style="width: 100%; background-color: #eeeeff; min-width: 400px; min-height: 300px;">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td valign="middle" style="width: 24px;">
                                                    <asp:ImageButton ID="ibPesquisa" runat="server" OnClick="btnPesquisa_Click" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/search.png"
                                                        ToolTip="Executa a pesquisa aplicando os filtros" />
                                                </td>
                                                <td valign="middle" align="left">
                                                    Filtros:
                                                </td>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            C&oacute;digo:</div>
                                                        <asp:TextBox ID="txtIdTitPag" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Filial:</div>
                                                        <asp:DropDownList ID="ddlIdFilial" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="Filial" DataValueField="PKString" AutoPostBack="True"
                                                            OnSelectedIndexChanged="filtraFilialDDL">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Banco:</div>
                                                        <asp:DropDownList ID="ddlIdBanco" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="idFornecedor" DataValueField="PKString" AutoPostBack="True"
                                                            OnSelectedIndexChanged="ddlBanco_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Conta&nbsp;Corrente:</div>
                                                        <asp:DropDownList ID="ddlIdCtaCor" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="CtaCor" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Caixa:</div>
                                                        <asp:DropDownList ID="ddlIdCaixa" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="Caixa" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Fornecedor:</div>
                                                        <asp:DropDownList ID="ddlIdFornecedor" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="pessoa" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Forma&nbsp;de&nbsp;Pagamento:</div>
                                                        <asp:DropDownList ID="ddlIdFormaPgto" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="FormaPgto" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Plano&nbsp;de&nbsp;Conta:</div>
                                                        <asp:DropDownList ID="ddlIdPlnCta" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="PlnCta" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Centro&nbsp;de&nbsp;Custo:</div>
                                                        <asp:DropDownList ID="ddlIdCCusto" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="CCusto" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Documento:</div>
                                                        <asp:TextBox ID="txtNrDoc" MaxLength="50" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel" align="center">
                                                            Data&nbsp;de&nbsp;Vencimento:</div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                De:</div>
                                                            <asp:TextBox ID="txtVctoDe" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtVctoDe" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtVctoDe" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtVctoDe" BehaviorID="imgtxtVctoDe" PopupButtonID="imgtxtVctoDe"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                At&eacute;:</div>
                                                            <asp:TextBox ID="txtVctoAte" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtVctoAte" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtVctoAte" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtVctoAte" BehaviorID="imgtxtVctoAte" PopupButtonID="imgtxtVctoAte"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel" align="center">
                                                            Data&nbsp;do&nbsp;Pagamento:</div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                De:</div>
                                                            <asp:TextBox ID="txtPgtoDe" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtPgtoDe" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtPgtoDe" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtPgtoDe" BehaviorID="imgtxtPgtoDe" PopupButtonID="imgtxtPgtoDe"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                At&eacute;:</div>
                                                            <asp:TextBox ID="txtPgtoAte" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtPgtoAte" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtPgtoAte" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtPgtoAte" BehaviorID="imgtxtPgtoAte" PopupButtonID="imgtxtPgtoAte"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel" align="center">
                                                            Valor:</div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                De:</div>
                                                            <asp:TextBox ID="txtValorDe" MaxLength="17" Width="80px" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                At&eacute;:</div>
                                                            <asp:TextBox ID="txtValorAte" MaxLength="17" Width="80px" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Situa&ccedil;&atilde;o:</div>
                                                        <asp:DropDownList ID="ddlSituacao" ForeColor="DarkBlue" Font-Bold="True" runat="server" />
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Titulo&nbsp;a&nbsp;Pagar&nbsp;Origin&aacute;rio:</div>
                                                        <asp:TextBox ID="txtIdTitPagOri" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                        <asp:MaskedEditExtender ID="meetxtIdTitPagOri" runat="server" Mask="99999999999"
                                                            TargetControlID="txtIdTitPagOri" PromptCharacter="" CultureAMPMPlaceholder=""
                                                            CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
                                                            CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                                                            Enabled="True" />
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Documento&nbsp;Origin&aacute;rio:</div>
                                                        <asp:TextBox ID="txtNrDocOri" MaxLength="50" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                        <hr />
                                        <asp:GridView ID="grvResultado" runat="server" AutoGenerateColumns="False" EmptyDataText="N&atilde;o foram encontrados registros nessa pesquisa!"
                                            CellPadding="1" ForeColor="#333333" AllowPaging="True" PageSize="50" OnPageIndexChanging="grvResultado_PageIndexChanging"
                                            OnRowDataBound="grvResultado_RowDataBound" EnableModelValidation="True">
                                            <Columns>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbVisualizar_Click"
                                                            ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                            ToolTip="Abrir formul&aacute;rio completo" />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="imgbParcelamento" runat="server" OnClick="imgbParcelamento_Click"
                                                            ImageUrl="~/App_Themes/Padrao/imagens/backoffice/pagar.png" CommandArgument='<%#Eval("PKString") + "|" + Eval("idFornecedor") + "|" + Eval("idFilial") %>'
                                                            ToolTip="Parcelar&nbsp;T&iacute;tulo" />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="idTitPag" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                                <asp:BoundField DataField="nrDoc" HeaderText="Documento" />
                                                <asp:BoundField DataField="vcto" HeaderText="Data&nbsp;de&nbsp;Vencimento" DataFormatString="{0:dd/MM/yyyy}" />
                                                <asp:BoundField DataField="pgto" HeaderText="Data&nbsp;do&nbsp;Pagamento" DataFormatString="{0:dd/MM/yyyy}" />
                                                <asp:BoundField DataField="valor" HeaderText="Valor&nbsp;do&nbsp;T&iacute;tulo" DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorJuroC" HeaderText="Valor&nbsp;Juros&nbsp;Cobrado"
                                                    DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorDescC" HeaderText="Valor&nbsp;Desconto&nbsp;Concedido"
                                                    DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorPago" HeaderText="Valor&nbsp;Recebido" DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorSaldo" HeaderText="Valor&nbsp;Saldo" DataFormatString="{0:c}" />
                                                <asp:TemplateField HeaderText="Situa&ccedil;&atilde;o">
                                                    <ItemTemplate>
                                                        <asp:HiddenField ID="hfIdTitPag" runat="server" Value='<%# Eval("PKString") %>' />
                                                        <asp:HiddenField ID="hfSituacao" runat="server" Value='<%# Eval("Situacao") %>' />
                                                        <asp:Label ID="lblSituacao" runat="server" Text="Situacao" />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                            </Columns>
                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <EditRowStyle BackColor="#999999" />
                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                        </asp:GridView>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tabCadastro" runat="server" HeaderText="Cadastro">
                                <ContentTemplate>
                                    <asp:Panel ID="panelCad" runat="server" BackColor="#eeeeee">
                                        <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <asp:Panel ID="panelBotoes" runat="server">
                                                            <asp:Button ID="btnSalvar" runat="server" Enabled="False" ValidationGroup="Salvar"
                                                                OnClick="btnSalvar_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnCancelar" runat="server" OnClick="btnCancelar_Click" Text="Cancelar"
                                                                UseSubmitBehavior="false" />
                                                            <asp:Button ID="btnEditar" runat="server" Enabled="False" OnClick="btnEditar_Click"
                                                                Text="Editar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnExcluir" runat="server" Enabled="False" OnClick="btnExcluir_Click"
                                                                Text="Excluir" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnNovo" runat="server" OnClick="btnNovo_Click" Text="Novo"
                                                                UseSubmitBehavior="false" />
                                                            <asp:ConfirmButtonExtender ID="ConfirmButtonExtender3" runat="server" TargetControlID="btnExcluir"
                                                                ConfirmText="Confirma a exclus&atilde;o de T&iacute;tulo&nbsp;a&nbsp;Pagar?">
                                                            </asp:ConfirmButtonExtender>
                                                            <hr />
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                C&oacute;digo:</div>
                                                            <asp:TextBox ID="txtCadIdTitPag" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                                onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                            <asp:MaskedEditExtender ID="meetxtCadIdTitPag" runat="server" Mask="99999999999"
                                                                TargetControlID="txtCadIdTitPag" PromptCharacter="" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Filial:</div>
                                                            <asp:DropDownList ID="ddlCadIdFilial" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Filial" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="filtraFilialDDL">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/CadastroFilial.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFilial"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdFilial" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Conta&nbsp;Corrente:</div>
                                                            <asp:DropDownList ID="ddlCadIdCtaCor" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="CtaCor" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCtaCor" />
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Banco:</div>
                                                            <asp:DropDownList ID="ddlCadIdBanco" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="idFornecedor" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="ddlBanco_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdBanco" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Caixa:</div>
                                                            <asp:DropDownList ID="ddlCadIdCaixa" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Caixa" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="~/CadastroCaixa.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCaixa"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCaixa" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Fornecedor:</div>
                                                            <asp:DropDownList ID="ddlCadIdFornecedor" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="idFornecedor" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdFornecedor" runat="server" NavigateUrl="~/CadastroFornecedor.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFornecedor"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdFornecedor" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdFornecedor" />
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Pesquisar Fonecedor:</div>
                                                            <asp:TextBox ID="txtCadPesquisarFornecedor" MaxLength="60" Width="100" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtCadPesquisarFornecedor" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvTxtCadPesquisarFornecedor" Display="None" runat="server" ValidationGroup="fornecedor"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vceTxtCadPesquisarFornecedor" runat="server" TargetControlID="rfvTxtCadPesquisarFornecedor">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <asp:ImageButton ID="btnPesquisarFornecedor" runat="server" OnClick="btnPesquisarFornecedor_Click"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/search.png" ToolTip="Executa a pesquisa aplicando os filtros"
                                                                ValidationGroup="fornecedor" Enabled="false" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Forma&nbsp;de&nbsp;Pagamento:</div>
                                                            <asp:DropDownList ID="ddlCadIdFormaPgto" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="FormaPgto" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl="~/CadastroFormapgto.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFormapgto"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdFormaPgto" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Plano&nbsp;de&nbsp;Conta:</div>
                                                            <asp:DropDownList ID="ddlCadIdPlnCta" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="PlnCta" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink11" runat="server" NavigateUrl="~/CadastroPlncta.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroPlncta"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton6" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdPlnCta" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Centro&nbsp;de&nbsp;Custo:</div>
                                                            <asp:DropDownList ID="ddlCadIdCCusto" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="CCusto" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdCCusto" runat="server" NavigateUrl="~/CadastroCcusto.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCcusto"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdCCusto" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCCusto" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Documento:</div>
                                                            <asp:TextBox ID="txtCadNrDoc" MaxLength="50" Width="310" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Documento&nbsp;Origin&aacute;rio:</div>
                                                            <asp:TextBox ID="txtCadNrDocOri" MaxLength="50" Width="310" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Observa&ccedil;&otilde;es:</div>
                                                            <asp:TextBox ID="txtCadObs" MaxLength="255" Width="350" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Data&nbsp;de&nbsp;Vencimento:</div>
                                                            <asp:TextBox ID="txtCadVcto" MaxLength="10" Width="80" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtCadVcto" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtCadVcto" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtCadVcto" BehaviorID="imgtxtCadVcto" PopupButtonID="imgtxtCadVcto"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtCadVcto" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtCadVcto" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtCadVcto" runat="server" TargetControlID="rfvtxtCadVcto">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Data&nbsp;do&nbsp;Pagamento:</div>
                                                            <asp:TextBox ID="txtCadPgto" MaxLength="10" Width="80" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;do&nbsp;T&iacute;tulo:</div>
                                                            <asp:TextBox ID="txtCadValor" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtCadValor" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtCadValor" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtCadValor" runat="server" TargetControlID="rfvtxtCadValor">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Acrescimos&nbsp;Cobrado:</div>
                                                            <asp:TextBox ID="txtCadValorJuroC" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Desconto&nbsp;Concedido:</div>
                                                            <asp:TextBox ID="txtCadValorDescC" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Pago:</div>
                                                            <asp:TextBox ID="txtCadValorPago" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Saldo:</div>
                                                            <asp:TextBox ID="txtCadValorSaldo" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Situa&ccedil;&atilde;o:</div>
                                                            <asp:DropDownList ID="ddlCadSituacao" ForeColor="DarkBlue" Font-Bold="true" runat="server" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <table border="0" cellpadding="0" cellspacing="3">
                                                            <tr>
                                                                <td class="FormLabel">
                                                                    Data Cadastro:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Cadastrado por:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Data Edi&ccedil;&atilde;o:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Editado por:
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltDataCadastro" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltCadastradoPor" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltDataEdicao" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltEditadoPor" runat="server"></asp:Literal>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tbPagamento" runat="server" HeaderText="Pagamento">
                                <ContentTemplate>
                                    <asp:Panel ID="pnlPagamento" runat="server" BackColor="#eeeeee">
                                        <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                T&iacute;tulo&nbsp;a&nbsp;Pagar:</div>
                                                            <div class="FormControl">
                                                                <asp:Literal ID="ltPagIDTitpag" runat="server"></asp:Literal>
                                                            </div>
                                                        </div>
                                                        <hr />
                                                        <br />
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblPagValor"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Acr&eacute;scimo:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblPagAcrescimo"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Desconto:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblPagDesconto"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Pago:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblPagPago"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Saldo:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblPagSaldo"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <asp:Panel ID="pnlBtnPagamento" runat="server">
                                                            <asp:Button ID="btnPagSalvar" runat="server" Enabled="False" ValidationGroup="Pagamento"
                                                                OnClick="btnPagSalvar_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnPagCancelar" runat="server" Enabled="False" OnClick="btnPagCancelar_Click"
                                                                Text="Cancelar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnPagNovo" runat="server" OnClick="btnPagNovo_Click" Text="Novo"
                                                                Enabled="False" UseSubmitBehavior="false" />
                                                            <hr />
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                C&oacute;digo:</div>
                                                            <asp:TextBox ID="txtPagCodigo" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                                onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                            <asp:MaskedEditExtender ID="meeTxtPagCodigo" runat="server" Mask="99999999999" TargetControlID="txtPagCodigo"
                                                                PromptCharacter="" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Filial:</div>
                                                            <asp:DropDownList ID="ddlPagFilial" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Filial" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="filtraFilialDDL">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink12" runat="server" NavigateUrl="~/CadastroFilial.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFilial"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton7" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdFilial" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Conta&nbsp;Corrente:</div>
                                                            <asp:DropDownList ID="ddlPagContaCorrente" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="CtaCor" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink13" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton8" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCtaCor" />
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Banco:</div>
                                                            <asp:DropDownList ID="ddlPagBanco" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="idFornecedor" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="ddlBanco_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink14" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton9" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdBanco" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Caixa:</div>
                                                            <asp:DropDownList ID="ddlPagCaixa" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Caixa" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink15" runat="server" NavigateUrl="~/CadastroCaixa.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCaixa"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton10" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCaixa" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Forma&nbsp;de&nbsp;Pagamento:</div>
                                                            <asp:DropDownList ID="ddlPagFormaPagamento" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="FormaPgto" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink16" runat="server" NavigateUrl="~/CadastroFormapgto.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFormapgto"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButton11" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdFormaPgto" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Data&nbsp;do&nbsp;Pagamento:</div>
                                                            <asp:TextBox ID="txtPagDataPagamento" MaxLength="10" Width="80" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtPagDataPagamento" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="imgtxtPagDataPagamentoo" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtPagDataPagamento" BehaviorID="imgtxtPagDataPagamento"
                                                                PopupButtonID="imgtxtPagDataPagamento" Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtPagDataPagamento" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvTxtPagDataPagamento" Display="None" runat="server" ValidationGroup="Pagamento"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vceTxtPagDataPagamento" runat="server" TargetControlID="rfvTxtPagDataPagamento">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;do&nbsp;T&iacute;tulo:</div>
                                                            <asp:TextBox ID="txtPagValor" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Acrescimos&nbsp;Cobrado:</div>
                                                            <asp:TextBox ID="txtPagValorJuros" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Desconto&nbsp;Concedido:</div>
                                                            <asp:TextBox ID="txtPagValorDescC" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Pago:</div>
                                                            <asp:TextBox ID="txtPagValorPago" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Situa&ccedil;&atilde;o:</div>
                                                            <div class="FormControl">
                                                                <asp:CheckBox ID="cbPagSituacao" runat="server" Text="Fechado" />
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <table border="0" cellpadding="0" cellspacing="3">
                                                            <tr>
                                                                <td class="FormLabel">
                                                                    Data Cadastro:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Cadastrado por:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Data Edi&ccedil;&atilde;o:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Editado por:
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltPagDataCadastro" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltPagCadastradoPor" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltPagDataEdicao" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltPagEditadoPor" runat="server"></asp:Literal>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            <hr />
                                            <asp:GridView ID="gvPagamento" runat="server" AutoGenerateColumns="False" EmptyDataText="N&atilde;o foram encontrados registros nessa pesquisa!"
                                                CellPadding="1" ForeColor="#333333" AllowPaging="True" PageSize="50" OnPageIndexChanging="grvResultado_PageIndexChanging"
                                                EnableModelValidation="True">
                                                <Columns>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbPagVisualizar" runat="server" OnClick="imgbPagVisualizar_Click"
                                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                                ToolTip="Abrir formulário completo" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="idMvtoFin" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                                    <asp:BoundField DataField="dtMvtoFin" HeaderText="Data&nbsp;do&nbsp;Pagamento" DataFormatString="{0:dd/MM/yyyy}" />
                                                    <asp:BoundField DataField="valor" HeaderText="Valor&nbsp;do&nbsp;T&iacute;tulo" DataFormatString="{0:c}" />
                                                    <asp:BoundField DataField="valorJuro" HeaderText="Valor&nbsp;Juros&nbsp;Cobrado"
                                                        DataFormatString="{0:c}" />
                                                    <asp:BoundField DataField="valorDesc" HeaderText="Valor&nbsp;Desconto&nbsp;Concedido"
                                                        DataFormatString="{0:c}" />
                                                    <asp:BoundField DataField="valorPago" HeaderText="Valor&nbsp;Recebido" DataFormatString="{0:c}" />
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tabTitpaghist" runat="server" HeaderText="Hist&oacute;rico&nbsp;de&nbsp;Titulo&nbsp;a&nbsp;Pagar">
                                <ContentTemplate>
                                    <asp:Panel ID="panelTitpaghist" runat="server" BackColor="#eeeeee">
                                        <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <div class="FormLabel">
                                                            T&iacute;tulo&nbsp;a&nbsp;Pagar:</div>
                                                        <div class="FormControl">
                                                            <asp:Literal ID="ltCadTitpaghistTitpag" runat="server"></asp:Literal>
                                                        </div>
                                                        <hr />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                C&oacute;digo:</div>
                                                            <asp:TextBox ID="txtCadTitpaghistIdTitPagHist" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                                onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" ReadOnly="true"></asp:TextBox>
                                                            <asp:MaskedEditExtender ID="meetxtCadTitpaghistIdTitPagHist" runat="server" Mask="99999999999"
                                                                TargetControlID="txtCadTitpaghistIdTitPagHist" PromptCharacter="" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                A&ccedil;&atilde;o:</div>
                                                            <asp:TextBox ID="txtCadTitpaghistTitPagAcao" MaxLength="45" Width="180" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Hist&oacute;rico&nbsp;do&nbsp;T&iacute;tulo:</div>
                                                            <asp:TextBox ID="txtCadTitpaghistTitPagHist" MaxLength="1000" Width="500" Height="200"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true" TextMode="MultiLine"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <table border="0" cellpadding="0" cellspacing="3">
                                                            <tr>
                                                                <td class="FormLabel">
                                                                    Data Cadastro:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Cadastrado por:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Data Edi&ccedil;&atilde;o:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Editado por:
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitpaghistDataCadastro" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitpaghistCadastradoPor" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitpaghistDataEdicao" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitpaghistEditadoPor" runat="server"></asp:Literal>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            <hr />
                                            <asp:GridView ID="grvCadTitpagxTitpaghist" runat="server" AutoGenerateColumns="False"
                                                EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                                GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3">
                                                <Columns>
                                                    <asp:TemplateField HeaderStyle-Width="10px">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbCadTitpaghistVisualizar_Click"
                                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>' />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="idTitPagHist" HeaderText="C&oacute;digo" DataFormatString="{0:N0}"
                                                        HeaderStyle-Width="70px" />
                                                    <asp:BoundField DataField="titPagHist" HeaderText="Hist&oacute;rico&nbsp;do&nbsp;T&iacute;tulo"
                                                        HeaderStyle-Width="300px" />
                                                    <asp:BoundField DataField="titPagAcao" HeaderText="A&ccedil;&atilde;o" HeaderStyle-Width="70px" />
                                                    <asp:BoundField DataField="Cadastro" HeaderText="Cadastro" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}"
                                                        HeaderStyle-Width="145px" />
                                                    <asp:BoundField DataField="CadastradoPor" HeaderText="Nome" HeaderStyle-Width="110px" />
                                                    <asp:BoundField DataField="Edicao" HeaderText="Edi&ccedil;&atilde;o" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}"
                                                        HeaderStyle-Width="145px" />
                                                    <asp:BoundField DataField="EditadoPor" HeaderText="Nome" HeaderStyle-Width="110px" />
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tabPagParcelamento" runat="server" HeaderText="Parcelamento">
                                <ContentTemplate>
                                    <div style="width: 100%; background-color: #eeeeff; min-width: 400px; min-height: 300px;">
                                        <div>
                                            <asp:GridView ID="gvPagParcelamento" runat="server" AutoGenerateColumns="False" CellPadding="1"
                                                ForeColor="#333333" OnRowDataBound="gvPagParcelamento_RowDataBound" AllowPaging="True"
                                                PageSize="50" EnableModelValidation="True">
                                                <Columns>
                                                    <asp:BoundField DataField="idTitPag" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                                    <asp:BoundField DataField="nrDoc" HeaderText="Documento" />
                                                    <asp:BoundField DataField="vcto" HeaderText="Data&nbsp;de&nbsp;Vencimento" DataFormatString="{0:dd/MM/yyyy}" />
                                                    <asp:BoundField DataField="valorSaldo" HeaderText="Valor&nbsp;Saldo" DataFormatString="{0:c}" />
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:HiddenField runat="server" ID="hfPagParcelamentoIdFornecedor" Value='<%#Eval("idFornecedor") %>' />
                                                            <asp:HiddenField runat="server" ID="hfPagParcelamentoIdFilial" Value='<%#Eval("idFilial") %>' />
                                                            <asp:ImageButton runat="server" ID="btnPagExcluirParcelamento" CommandArgument='<%#Eval("PKString") %>'
                                                                OnClick="btnPagExcluirParcelamento_click" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/remove.png"
                                                                ToolTip="Excluir&nbsp;T&iacute;tulo&nbsp;do&nbsp;Parcelamento" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                            <hr />
                                        </div>
                                        <div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Documento&nbsp;Origin&aacute;rio:</div>
                                                <asp:TextBox ID="txtPagParcelaDocOri" runat="server" ReadOnly="true" MaxLength="200"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Fornecedor:</div>
                                                <asp:TextBox ID="txtPagParcelaIdFornecedor" runat="server" ReadOnly="true" MaxLength="200"></asp:TextBox>
                                                <asp:HiddenField ID="hfPagParcelaIdFornecedor" runat="server" />
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Filial:</div>
                                                <asp:TextBox ID="txtPagParcelaIdFilial" runat="server" ReadOnly="true" MaxLength="200"></asp:TextBox>
                                                <asp:HiddenField ID="hfPagParcelaIdFilial" runat="server" />
                                            </div>
                                            <br />
                                            <br />
                                            <br />
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Total:</div>
                                                <asp:TextBox ID="txtPagParcelaSaldo" runat="server" ReadOnly="true" Width="120px"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    qtd&nbsp;de&nbsp;Parcelas:</div>
                                                <asp:TextBox ID="txtPagParcelaQtd" runat="server" Width="100px" onkeypress="strictNum();"
                                                    MaxLength="3" ValidationGroup="pagParcelar"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    1&ordm;&nbsp;Vencimento:</div>
                                                <asp:TextBox ID="txtPagParcelaVencimento" runat="server" Width="70px" MaxLength="10"
                                                    onkeypress="MascaraData();" onblur="validaData();" ValidationGroup="pagParcelar"></asp:TextBox>
                                                <asp:ImageButton ID="imgtxtPagParcelaVencimento" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                <asp:CalendarExtender ID="cetxtPagParcelaVencimento" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                    Enabled="True" TargetControlID="txtPagParcelaVencimento" PopupButtonID="imgtxtPagParcelaVencimento"
                                                    Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                </asp:CalendarExtender>
                                                <asp:RequiredFieldValidator ControlToValidate="txtPagParcelaVencimento" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvTxtPagParcelaVencimento" Display="None" runat="server" ValidationGroup="pagParcelar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceTxtPagParcelaVencimento" runat="server" TargetControlID="rfvTxtPagParcelaVencimento">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                            <div class="FormDiv">
                                                <asp:Button runat="server" ID="btnPagParcela" Text="Parcelar" OnClick="btnPagParcela_click"
                                                    ValidationGroup="pagParcelar" />
                                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtender4" runat="server" TargetControlID="btnPagParcela"
                                                    ConfirmText="Confirma o parcelamento dos T&iacute;tulo&nbsp;a&nbsp;Pagar?">
                                                </asp:ConfirmButtonExtender>
                                            </div>
                                            <div class="FormDiv">
                                                <asp:Button runat="server" ID="btnPagParcelaLimpar" OnClick="btnPagParcelaLimpar_click"
                                                    Text="Limpa Parcelamento" />
                                            </div>
                                        </div>
                                        <br />
                                        <br />
                                        <br />
                                        <hr />
                                        <div>
                                            <asp:ImageButton ID="imgbPagParcelasAlterar" runat="server" OnClick="imgbPagParcelasAlterar_Click"
                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/salvar.png" ToolTip="Salvar&nbsp;edi&ccedil;&atilde;o&nbsp;da&nbsp;parcela" />
                                            <asp:Label runat="server" ID="lblPagParcelamentoValorTotal" Text="Valor Total: " />
                                            <asp:GridView ID="gvPagParcelamentoResultado" runat="server" AutoGenerateColumns="False"
                                                CellPadding="1" ForeColor="#333333" OnRowDataBound="gvPagParcelamentoResultado_RowDataBound"
                                                EnableModelValidation="True">
                                                <Columns>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbVisualizar_Click"
                                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                                ToolTip="Abrir formul&aacute;rio completo" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="n&ordm;&nbsp;Parcela">
                                                        <ItemTemplate>
                                                            <asp:Label runat="server" ID="lblPagParcelamentoNumParcelar" Text='<%# Container.DataItemIndex+1 %>' />
                                                            <asp:HiddenField ID="hfPagParcelamentoIdTitpag" runat="server" Value='<%#Eval("PKString") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Documento">
                                                        <ItemTemplate>
                                                            <asp:TextBox runat="server" ID="txtPagParcelamentoNrDoc" Text='<%#Eval("nrDoc") %>'
                                                                ValidationGroup='<%#"parcela" + Eval("PKString") %>' MaxLength="17" Width="112"
                                                                ForeColor="DarkBlue" Font-Bold="True" />
                                                            <asp:RequiredFieldValidator ControlToValidate="txtPagParcelamentoNrDoc" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvTxtPagParcelamentoNrDoc" Display="None" runat="server" ValidationGroup='<%#"parcela" + Eval("PKString") %>'></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vceTxtPagParcelamentoNrDoc" runat="server" TargetControlID="rfvTxtPagParcelamentoNrDoc">
                                                            </asp:ValidatorCalloutExtender>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Data&nbsp;de&nbsp;Vencimento">
                                                        <ItemTemplate>
                                                            <asp:TextBox runat="server" ID="txtPagParcelamentoVencimento" Text='<%#String.Format("{0:d}", Eval("vcto")) %>'
                                                                ValidationGroup='<%#"parcela" + Eval("PKString") %>' MaxLength="10" Width="80px"
                                                                onkeypress="MascaraData();" onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtPagParcelamentoVencimento" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtPagParcelamentoVencimento" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtPagParcelamentoVencimento" PopupButtonID="imgtxtPagParcelamentoVencimento"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtPagParcelamentoVencimento" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvTxtPagParcelamentoVencimento" Display="None" runat="server" ValidationGroup='<%#"parcela" + Eval("PKString") %>'></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vceTxtPagParcelamentoVencimento" runat="server"
                                                                TargetControlID="rfvTxtPagParcelamentoVencimento">
                                                            </asp:ValidatorCalloutExtender>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Valor&nbsp;do&nbsp;T&iacute;tulo">
                                                        <ItemTemplate>
                                                            <asp:TextBox runat="server" ID="txtPagParcelamentoValor" Text='<%#Eval("valor") %>'
                                                                ValidationGroup='<%#"parcela" + Eval("PKString") %>' MaxLength="17" Width="112"
                                                                ForeColor="DarkBlue" Font-Bold="True" onkeypress="mascaraMoeda();" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                        </asp:TabContainer>
                        <!-- fim pagar sub categorias -->
                    </ContentTemplate>
                </asp:TabPanel>
                <!--  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
                <!--  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
                <!--  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
                <asp:TabPanel runat="server" HeaderText="T&iacute;tulos&nbsp;a&nbsp;Receber:" ID="TabPanel1">
                    <ContentTemplate>
                        <!-- pagar sub categorias -->
                        <asp:TabContainer ID="tabTitrec" runat="server" ActiveTabIndex="0" CssClass="">
                            <asp:TabPanel ID="tabPesquisaRec" runat="server" HeaderText="Pesquisa">
                                <ContentTemplate>
                                    <div style="width: 100%; background-color: #eeeeff; min-width: 400px; min-height: 300px;">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td valign="middle" style="width: 24px;">
                                                    <asp:ImageButton ID="ibPesquisaRec" runat="server" OnClick="btnPesquisaRec_Click"
                                                        ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/search.png" ToolTip="Executa a pesquisa aplicando os filtros" />
                                                </td>
                                                <td valign="middle" align="left">
                                                    Filtros:
                                                </td>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            C&oacute;digo:</div>
                                                        <asp:TextBox ID="txtIdTitRec" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Filial:</div>
                                                        <asp:DropDownList ID="ddlIdFilialRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="Filial" DataValueField="PKString" AutoPostBack="True"
                                                            OnSelectedIndexChanged="filtraFilialDDLRec">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Banco:</div>
                                                        <asp:DropDownList ID="ddlIdBancoRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="idCliente" DataValueField="PKString" AutoPostBack="True"
                                                            OnSelectedIndexChanged="ddlBancoRec_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Conta&nbsp;Corrente:</div>
                                                        <asp:DropDownList ID="ddlIdCtaCorRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="CtaCor" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Caixa:</div>
                                                        <asp:DropDownList ID="ddlIdCaixaRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="Caixa" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Cliente:</div>
                                                        <asp:DropDownList ID="ddlIdClienteRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="pessoa" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Forma&nbsp;de&nbsp;Pagamento:</div>
                                                        <asp:DropDownList ID="ddlIdFormaPgtoRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="FormaPgto" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Plano&nbsp;de&nbsp;Conta:</div>
                                                        <asp:DropDownList ID="ddlIdPlnCtaRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="PlnCta" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Centro&nbsp;de&nbsp;Lucro:</div>
                                                        <asp:DropDownList ID="ddlIdCLucroRec" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="CCusto" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Documento:</div>
                                                        <asp:TextBox ID="txtNrDocRec" MaxLength="50" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel" align="center">
                                                            Data&nbsp;de&nbsp;Vencimento:</div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                De:</div>
                                                            <asp:TextBox ID="txtVctoDeRec" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtVctoDeRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtVctoDeRec" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtVctoDeRec" BehaviorID="imgtxtVctoDeRec" PopupButtonID="imgtxtVctoDeRec"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                At&eacute;:</div>
                                                            <asp:TextBox ID="txtVctoAteRec" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtVctoAteRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtVctoAteRec" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtVctoAteRec" BehaviorID="imgtxtVctoAteRec"
                                                                PopupButtonID="imgtxtVctoAteRec" Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel" align="center">
                                                            Data&nbsp;do&nbsp;Pagamento:</div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                De:</div>
                                                            <asp:TextBox ID="txtPgtoDeRec" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtPgtoDeRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtPgtoDeRec" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtPgtoDeRec" BehaviorID="imgtxtPgtoDeRec" PopupButtonID="imgtxtPgtoDeRec"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                At&eacute;:</div>
                                                            <asp:TextBox ID="txtPgtoAteRec" MaxLength="10" Width="80px" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtPgtoAteRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtPgtoAteRec" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtPgtoAteRec" BehaviorID="imgtxtPgtoAteRec"
                                                                PopupButtonID="imgtxtPgtoAteRec" Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                        </div>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel" align="center">
                                                            Valor:</div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                De:</div>
                                                            <asp:TextBox ID="txtValorDeRec" MaxLength="17" Width="80px" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                At&eacute;:</div>
                                                            <asp:TextBox ID="txtValorAteRec" MaxLength="17" Width="80px" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Situa&ccedil;&atilde;o:</div>
                                                        <asp:DropDownList ID="ddlSituacaoRec" ForeColor="DarkBlue" Font-Bold="True" runat="server" />
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Titulo&nbsp;a&nbsp;Pagar&nbsp;Origin&aacute;rio:</div>
                                                        <asp:TextBox ID="txtIdTitRecOri" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                        <asp:MaskedEditExtender ID="meetxtIdTitRecOri" runat="server" Mask="99999999999"
                                                            TargetControlID="txtIdTitRecOri" PromptCharacter="" CultureAMPMPlaceholder=""
                                                            CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
                                                            CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                                                            Enabled="True" />
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Documento&nbsp;Origin&aacute;rio:</div>
                                                        <asp:TextBox ID="txtNrDocRecOri" MaxLength="50" Width="100px" ForeColor="DarkBlue"
                                                            Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                        <hr />
                                        <asp:GridView ID="grvResultadoRec" runat="server" AutoGenerateColumns="False" EmptyDataText="N&atilde;o foram encontrados registros nessa pesquisa!"
                                            CellPadding="1" ForeColor="#333333" AllowPaging="True" PageSize="50" OnPageIndexChanging="grvResultadoRec_PageIndexChanging"
                                            OnRowDataBound="grvResultadoRec_RowDataBound" EnableModelValidation="True">
                                            <Columns>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbVisualizarRec_Click"
                                                            ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                            ToolTip="Abrir formul&aacute;rio completo" />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="imgbParcelamentoRec" runat="server" OnClick="imgbParcelamentoRec_Click"
                                                            ImageUrl="~/App_Themes/Padrao/imagens/backoffice/pagar.png" CommandArgument='<%#Eval("PKString") + "|" + Eval("idCliente") + "|" + Eval("idFilial") %>'
                                                            ToolTip="Parcelar&nbsp;T&iacute;tulo" />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="idTitRec" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                                <asp:BoundField DataField="nrDoc" HeaderText="Documento" />
                                                <asp:BoundField DataField="vcto" HeaderText="Data&nbsp;de&nbsp;Vencimento" DataFormatString="{0:dd/MM/yyyy}" />
                                                <asp:BoundField DataField="pgto" HeaderText="Data&nbsp;do&nbsp;Pagamento" DataFormatString="{0:dd/MM/yyyy}" />
                                                <asp:BoundField DataField="valor" HeaderText="Valor&nbsp;do&nbsp;T&iacute;tulo" DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorJuroC" HeaderText="Valor&nbsp;Juros&nbsp;Cobrado"
                                                    DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorDescC" HeaderText="Valor&nbsp;Desconto&nbsp;Concedido"
                                                    DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorRec" HeaderText="Valor&nbsp;Recebido" DataFormatString="{0:c}" />
                                                <asp:BoundField DataField="valorSaldo" HeaderText="Valor&nbsp;Saldo" DataFormatString="{0:c}" />
                                                <asp:TemplateField HeaderText="Situa&ccedil;&atilde;o">
                                                    <ItemTemplate>
                                                        <asp:HiddenField ID="hfIdTitRec" runat="server" Value='<%# Eval("PKString") %>' />
                                                        <asp:HiddenField ID="hfSituacaoRec" runat="server" Value='<%# Eval("Situacao") %>' />
                                                        <asp:Label ID="lblSituacaoRec" runat="server" Text="Situacao" />
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                            </Columns>
                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <EditRowStyle BackColor="#999999" />
                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                        </asp:GridView>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tabCadastroRec" runat="server" HeaderText="Cadastro">
                                <ContentTemplate>
                                    <asp:Panel ID="panelCadRec" runat="server" BackColor="#eeeeee">
                                        <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <asp:Panel ID="panelBotoesRec" runat="server">
                                                            <asp:Button ID="btnSalvarRec" runat="server" Enabled="False" ValidationGroup="salvarRec"
                                                                OnClick="btnSalvarRec_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnCancelarRec" runat="server" OnClick="btnCancelarRec_Click"
                                                                Text="Cancelar" UseSubmitBehavior="false" />
                                                            <asp:Button ID="btnEditarRec" runat="server" Enabled="False" OnClick="btnEditarRec_Click"
                                                                Text="Editar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnExcluirRec" runat="server" Enabled="False" OnClick="btnExcluirRec_Click"
                                                                Text="Excluir" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnNovoRec" runat="server" OnClick="btnNovoRec_Click" Text="Novo"
                                                                UseSubmitBehavior="false" />
                                                            <asp:ConfirmButtonExtender ID="ConfirmButtonExtender10" runat="server" TargetControlID="btnExcluirRec"
                                                                ConfirmText="Confirma a exclus&atilde;o de T&iacute;tulo&nbsp;a&nbsp;Pagar?">
                                                            </asp:ConfirmButtonExtender>
                                                            <hr />
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                C&oacute;digo:</div>
                                                            <asp:TextBox ID="txtCadIdTitRec" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                                onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                            <asp:MaskedEditExtender ID="meetxtCadIdTitRec" runat="server" Mask="99999999999"
                                                                TargetControlID="txtCadIdTitRec" PromptCharacter="" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Filial:</div>
                                                            <asp:DropDownList ID="ddlCadIdFilialRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Filial" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="filtraFilialDDLRec">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdFilialRec" runat="server" NavigateUrl="~/CadastroFilial.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFilial"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdFilialRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdFilialRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Conta&nbsp;Corrente:</div>
                                                            <asp:DropDownList ID="ddlCadIdCtaCorRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="CtaCor" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdCtaCorRec" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdCtaCorRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCtaCorRec" />
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Banco:</div>
                                                            <asp:DropDownList ID="ddlCadIdBancoRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="idCliente" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="ddlBancoRec_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadBancoRec" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdBancoRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdBancoRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Caixa:</div>
                                                            <asp:DropDownList ID="ddlCadIdCaixaRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Caixa" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdCaixaRec" runat="server" NavigateUrl="~/CadastroCaixa.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCaixa"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdCaixaRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdCaixaRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Cliente:</div>
                                                            <asp:DropDownList ID="ddlCadIdClienteRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="idCliente" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdClienteRec" runat="server" NavigateUrl="~/CadastroCliente.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCliente"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdClienteRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlCadIdClienteRec" />
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Pesquisar Fonecedor:</div>
                                                            <asp:TextBox ID="txtCadPesquisarClienteRec" MaxLength="60" Width="100" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtCadPesquisarClienteRec" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtCadPesquisarClienteRec" Display="None" runat="server" ValidationGroup="Cliente"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtCadPesquisarClienteRec" runat="server" TargetControlID="rfvtxtCadPesquisarClienteRec">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <asp:ImageButton ID="btnPesquisarClienteRec" runat="server" OnClick="btnPesquisarClienteRec_Click"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/search.png" ToolTip="Executa a pesquisa aplicando os filtros"
                                                                ValidationGroup="Cliente" Enabled="false" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Forma&nbsp;de&nbsp;Pagamento:</div>
                                                            <asp:DropDownList ID="ddlCadIdFormaPgtoRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="FormaPgto" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdFormaPgtoRec" runat="server" NavigateUrl="~/CadastroFormapgto.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFormapgto"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdFormaPgtoRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdFormaPgtoRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Plano&nbsp;de&nbsp;Conta:</div>
                                                            <asp:DropDownList ID="ddlCadIdPlnCtaRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="PlnCta" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdPlnCtaRec" runat="server" NavigateUrl="~/CadastroPlncta.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroPlncta"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdPlnCtaRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdPlnCtaRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Centro&nbsp;de&nbsp;Custo:</div>
                                                            <asp:DropDownList ID="ddlCadIdCLucroRec" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="CCusto" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLinkCadIdCLucroRec" runat="server" NavigateUrl="~/CadastroCLucro.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCLucro"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="ImageButtonCadIdCLucroRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdCLucroRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Documento:</div>
                                                            <asp:TextBox ID="txtCadNrDocRec" MaxLength="50" Width="310" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Documento&nbsp;Origin&aacute;rio:</div>
                                                            <asp:TextBox ID="txtCadNrDocRecOri" MaxLength="50" Width="310" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Observa&ccedil;&otilde;es:</div>
                                                            <asp:TextBox ID="txtCadObsRec" MaxLength="255" Width="350" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Data&nbsp;de&nbsp;Vencimento:</div>
                                                            <asp:TextBox ID="txtCadVctoRec" MaxLength="10" Width="80" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtCadVctoRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtCadVctoRec" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtCadVctoRec" BehaviorID="imgtxtCadVctoRec"
                                                                PopupButtonID="imgtxtCadVctoRec" Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtCadVctoRec" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtCadVctoRec" Display="None" runat="server" ValidationGroup="salvarRec"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtCadVctoRec" runat="server" TargetControlID="rfvtxtCadVctoRec">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Data&nbsp;do&nbsp;Pagamento:</div>
                                                            <asp:TextBox ID="txtCadPgtoRec" MaxLength="10" Width="80" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;do&nbsp;T&iacute;tulo:</div>
                                                            <asp:TextBox ID="txtCadValorRec" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtCadValorRec" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtCadValorRec" Display="None" runat="server" ValidationGroup="salvarRec"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtCadValorRec" runat="server" TargetControlID="rfvtxtCadValorRec">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Acrescimos&nbsp;Cobrado:</div>
                                                            <asp:TextBox ID="txtCadValorRecJuroC" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Desconto&nbsp;Concedido:</div>
                                                            <asp:TextBox ID="txtCadValorRecDescC" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Pago:</div>
                                                            <asp:TextBox ID="txtCadValorPagoRec" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Saldo:</div>
                                                            <asp:TextBox ID="txtCadValorRecSaldo" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Situa&ccedil;&atilde;o:</div>
                                                            <asp:DropDownList ID="ddlCadSituacaoRec" ForeColor="DarkBlue" Font-Bold="true" runat="server" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <table border="0" cellpadding="0" cellspacing="3">
                                                            <tr>
                                                                <td class="FormLabel">
                                                                    Data Cadastro:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Cadastrado por:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Data Edi&ccedil;&atilde;o:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Editado por:
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltDataCadastroRec" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltCadastradoPorRec" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltDataEdicaoRec" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltEditadoPorRec" runat="server"></asp:Literal>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tbPagamentoRec" runat="server" HeaderText="Pagamento">
                                <ContentTemplate>
                                    <asp:Panel ID="pnlRecebimentoRec" runat="server" BackColor="#eeeeee">
                                        <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                T&iacute;tulo&nbsp;a&nbsp;Pagar:</div>
                                                            <div class="FormControl">
                                                                <asp:Literal ID="ltRecIDTitrec" runat="server"></asp:Literal>
                                                            </div>
                                                        </div>
                                                        <hr />
                                                        <br />
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblRecValor"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Acr&eacute;scimo:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblRecAcrescimo"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Desconto:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblRecDesconto"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Pago:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblRecPago"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Saldo:</div>
                                                            <div class="FormControl">
                                                                <asp:Label runat="server" ID="lblRecSaldo"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <asp:Panel ID="pnlbtnRecamentoRec" runat="server">
                                                            <asp:Button ID="btnRecSalvar" runat="server" Enabled="False" ValidationGroup="PagamentoRec"
                                                                OnClick="btnRecSalvar_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnRecCancelar" runat="server" Enabled="False" OnClick="btnRecCancelar_Click"
                                                                Text="Cancelar" UseSubmitBehavior="false" />
                                                            &nbsp;<asp:Button ID="btnRecNovo" runat="server" OnClick="btnRecNovo_Click" Text="Novo"
                                                                Enabled="False" UseSubmitBehavior="false" />
                                                            <hr />
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                C&oacute;digo:</div>
                                                            <asp:TextBox ID="txtRecCodigo" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                                onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server"></asp:TextBox>
                                                            <asp:MaskedEditExtender ID="meetxtRecCodigo" runat="server" Mask="99999999999" TargetControlID="txtRecCodigo"
                                                                PromptCharacter="" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Filial:</div>
                                                            <asp:DropDownList ID="ddlRecFilial" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Filial" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="filtraFilialDDLRec">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink1Rec" runat="server" NavigateUrl="~/CadastroFilial.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFilial"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="imgBtFilialRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdFilialRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Conta&nbsp;Corrente:</div>
                                                            <asp:DropDownList ID="ddlRecContaCorrente" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="CtaCor" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink2Rec" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="imgBtContaCorrenteRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdCtaCorRec" />
                                                        </div>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Banco:</div>
                                                            <asp:DropDownList ID="ddlRecBanco" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="idCliente" DataValueField="PKString" AutoPostBack="true"
                                                                OnSelectedIndexChanged="ddlBancoRec_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink3Rec" runat="server" NavigateUrl="~/CadastroBanco.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBanco"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="imgBtBancoRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarDdlIdBancoRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Caixa:</div>
                                                            <asp:DropDownList ID="ddlRecCaixa" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="Caixa" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink5Rec" runat="server" NavigateUrl="~/CadastroCaixa.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCaixa"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="imgBtCaixaRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdCaixaRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Forma&nbsp;de&nbsp;Pagamento:</div>
                                                            <asp:DropDownList ID="ddlRecFormaPagamento" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" DataTextField="FormaPgto" DataValueField="PKString">
                                                            </asp:DropDownList>
                                                            <asp:HyperLink ID="HyperLink4Rec" runat="server" NavigateUrl="~/CadastroFormapgto.aspx"
                                                                ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroFormapgto"
                                                                ToolTip="Editar cadastro"></asp:HyperLink>
                                                            <asp:ImageButton ID="imgBtFormaPagamentoRec" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                                ToolTip="Atualizar lista" OnClick="atualizarddlIdFormaPgtoRec" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Data&nbsp;do&nbsp;Pagamento:</div>
                                                            <asp:TextBox ID="txtRecDataPagamento" MaxLength="10" Width="80" onkeypress="MascaraData();"
                                                                onblur="validaData();" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtRecDataPagamento" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="imgtxtRecDataPagamentoo" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtRecDataPagamento" BehaviorID="imgtxtRecDataPagamento"
                                                                PopupButtonID="imgtxtRecDataPagamento" Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtRecDataPagamento" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtRecDataPagamento" Display="None" runat="server" ValidationGroup="PagamentoRec"></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtRecDataPagamento" runat="server" TargetControlID="rfvtxtRecDataPagamento">
                                                            </asp:ValidatorCalloutExtender>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;do&nbsp;T&iacute;tulo:</div>
                                                            <asp:TextBox ID="txtRecValor" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Acrescimos&nbsp;Cobrado:</div>
                                                            <asp:TextBox ID="txtRecValorJuros" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Desconto&nbsp;Concedido:</div>
                                                            <asp:TextBox ID="txtRecValorDescC" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Valor&nbsp;Pago:</div>
                                                            <asp:TextBox ID="txtRecValorPago" MaxLength="17" Width="112" onkeypress="mascaraMoeda();"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Situa&ccedil;&atilde;o:</div>
                                                            <div class="FormControl">
                                                                <asp:CheckBox ID="cbRecSituacao" runat="server" Text="Fechado" />
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <table border="0" cellpadding="0" cellspacing="3">
                                                            <tr>
                                                                <td class="FormLabel">
                                                                    Data Cadastro:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Cadastrado por:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Data Edi&ccedil;&atilde;o:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Editado por:
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltRecDataCadastro" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltRecCadastradoPor" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltRecDataEdicao" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltRecEditadoPor" runat="server"></asp:Literal>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            <hr />
                                            <asp:GridView ID="gvRecebimentoRec" runat="server" AutoGenerateColumns="False" EmptyDataText="N&atilde;o foram encontrados registros nessa pesquisa!"
                                                CellPadding="1" ForeColor="#333333" AllowPaging="True" PageSize="50" OnPageIndexChanging="grvResultadoRec_PageIndexChanging"
                                                EnableModelValidation="True">
                                                <Columns>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbRecVisualizar" runat="server" OnClick="imgbRecVisualizar_Click"
                                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                                ToolTip="Abrir formulário completo" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="idMvtoFin" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                                    <asp:BoundField DataField="dtMvtoFin" HeaderText="Data&nbsp;do&nbsp;Pagamento" DataFormatString="{0:dd/MM/yyyy}" />
                                                    <asp:BoundField DataField="valor" HeaderText="Valor&nbsp;do&nbsp;T&iacute;tulo" DataFormatString="{0:c}" />
                                                    <asp:BoundField DataField="valorJuro" HeaderText="Valor&nbsp;Juros&nbsp;Cobrado"
                                                        DataFormatString="{0:c}" />
                                                    <asp:BoundField DataField="valorDesc" HeaderText="Valor&nbsp;Desconto&nbsp;Concedido"
                                                        DataFormatString="{0:c}" />
                                                    <asp:BoundField DataField="valorPago" HeaderText="Valor&nbsp;Recebido" DataFormatString="{0:c}" />
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tabTitrechist" runat="server" HeaderText="Hist&oacute;rico&nbsp;de&nbsp;Titulo&nbsp;a&nbsp;Pagar">
                                <ContentTemplate>
                                    <asp:Panel ID="panelTitrechist" runat="server" BackColor="#eeeeee">
                                        <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <div class="FormLabel">
                                                            T&iacute;tulo&nbsp;a&nbsp;Pagar:</div>
                                                        <div class="FormControl">
                                                            <asp:Literal ID="ltCadTitrechistTitrec" runat="server"></asp:Literal>
                                                        </div>
                                                        <hr />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                C&oacute;digo:</div>
                                                            <asp:TextBox ID="txtCadTitrechistIdTitRecHist" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                                onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                                runat="server" ReadOnly="true"></asp:TextBox>
                                                            <asp:MaskedEditExtender ID="meetxtCadTitrechistIdTitRecHist" runat="server" Mask="99999999999"
                                                                TargetControlID="txtCadTitrechistIdTitRecHist" PromptCharacter="" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                A&ccedil;&atilde;o:</div>
                                                            <asp:TextBox ID="txtCadTitrechistTitRecAcao" MaxLength="45" Width="180" ForeColor="DarkBlue"
                                                                Font-Bold="true" runat="server" ReadOnly="true"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Hist&oacute;rico&nbsp;do&nbsp;T&iacute;tulo:</div>
                                                            <asp:TextBox ID="txtCadTitrechistTitRecHist" MaxLength="1000" Width="500" Height="200"
                                                                ForeColor="DarkBlue" Font-Bold="true" runat="server" ReadOnly="true" TextMode="MultiLine"></asp:TextBox>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <hr />
                                                        <table border="0" cellpadding="0" cellspacing="3">
                                                            <tr>
                                                                <td class="FormLabel">
                                                                    Data Cadastro:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Cadastrado por:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Data Edi&ccedil;&atilde;o:
                                                                </td>
                                                                <td class="FormLabel">
                                                                    Editado por:
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitrechistDataCadastro" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitrechistCadastradoPor" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitrechistDataEdicao" runat="server"></asp:Literal>
                                                                </td>
                                                                <td class="FormControl">
                                                                    <asp:Literal ID="ltTitrechistEditadoPor" runat="server"></asp:Literal>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            <hr />
                                            <asp:GridView ID="grvCadTitrecxTitrechist" runat="server" AutoGenerateColumns="False"
                                                EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                                GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3">
                                                <Columns>
                                                    <asp:TemplateField HeaderStyle-Width="10px">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbVisualizarRec" runat="server" OnClick="imgbCadTitrechistVisualizar_Click"
                                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>' />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="idTitRecHist" HeaderText="C&oacute;digo" DataFormatString="{0:N0}"
                                                        HeaderStyle-Width="70px" />
                                                    <asp:BoundField DataField="titRecHist" HeaderText="Hist&oacute;rico&nbsp;do&nbsp;T&iacute;tulo"
                                                        HeaderStyle-Width="300px" />
                                                    <asp:BoundField DataField="titRecAcao" HeaderText="A&ccedil;&atilde;o" HeaderStyle-Width="70px" />
                                                    <asp:BoundField DataField="Cadastro" HeaderText="Cadastro" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}"
                                                        HeaderStyle-Width="145px" />
                                                    <asp:BoundField DataField="CadastradoPor" HeaderText="Nome" HeaderStyle-Width="110px" />
                                                    <asp:BoundField DataField="Edicao" HeaderText="Edi&ccedil;&atilde;o" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}"
                                                        HeaderStyle-Width="145px" />
                                                    <asp:BoundField DataField="EditadoPor" HeaderText="Nome" HeaderStyle-Width="110px" />
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="tabRecParcelamento" runat="server" HeaderText="Parcelamento">
                                <ContentTemplate>
                                    <div style="width: 100%; background-color: #eeeeff; min-width: 400px; min-height: 300px;">
                                        <div>
                                            <asp:GridView ID="gvRecParcelamento" runat="server" AutoGenerateColumns="False" CellPadding="1"
                                                ForeColor="#333333" OnRowDataBound="gvRecParcelamento_RowDataBound" AllowPaging="True"
                                                PageSize="50" EnableModelValidation="True">
                                                <Columns>
                                                    <asp:BoundField DataField="idTitRec" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                                    <asp:BoundField DataField="nrDoc" HeaderText="Documento" />
                                                    <asp:BoundField DataField="vcto" HeaderText="Data&nbsp;de&nbsp;Vencimento" DataFormatString="{0:dd/MM/yyyy}" />
                                                    <asp:BoundField DataField="valorSaldo" HeaderText="Valor&nbsp;Saldo" DataFormatString="{0:c}" />
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:HiddenField runat="server" ID="hfRecParcelamentoIdCliente" Value='<%#Eval("idCliente") %>' />
                                                            <asp:HiddenField runat="server" ID="hfRecParcelamentoIdFilial" Value='<%#Eval("idFilial") %>' />
                                                            <asp:ImageButton runat="server" ID="btnRecExcluirParcelamento" CommandArgument='<%#Eval("PKString") %>'
                                                                OnClick="btnRecExcluirParcelamento_click" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/remove.png"
                                                                ToolTip="Excluir&nbsp;T&iacute;tulo&nbsp;do&nbsp;Parcelamento" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                            <hr />
                                        </div>
                                        <div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Documento&nbsp;Origin&aacute;rio:</div>
                                                <asp:TextBox ID="txtRecParcelaDocOri" runat="server" ReadOnly="true" MaxLength="200"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Cliente:</div>
                                                <asp:TextBox ID="txtRecParcelaIdCliente" runat="server" ReadOnly="true" MaxLength="200"></asp:TextBox>
                                                <asp:HiddenField ID="hfRecParcelaIdCliente" runat="server" />
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Filial:</div>
                                                <asp:TextBox ID="txtRecParcelaIdFilial" runat="server" ReadOnly="true" MaxLength="200"></asp:TextBox>
                                                <asp:HiddenField ID="hfRecParcelaIdFilial" runat="server" />
                                            </div>
                                            <br />
                                            <br />
                                            <br />
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Total:</div>
                                                <asp:TextBox ID="txtRecParcelaSaldo" runat="server" ReadOnly="true" Width="120px"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    qtd&nbsp;de&nbsp;Parcelas:</div>
                                                <asp:TextBox ID="txtRecParcelaQtd" runat="server" Width="100px" onkeypress="strictNum();"
                                                    MaxLength="3" ValidationGroup="recParcelar"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    1&ordm;&nbsp;Vencimento:</div>
                                                <asp:TextBox ID="txtRecParcelaVencimento" runat="server" Width="70px" MaxLength="10"
                                                    onkeypress="MascaraData();" onblur="validaData();" ValidationGroup="recParcelar"></asp:TextBox>
                                                <asp:ImageButton ID="imgtxtRecParcelaVencimento" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                <asp:CalendarExtender ID="cetxtRecParcelaVencimento" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                    Enabled="True" TargetControlID="txtRecParcelaVencimento" PopupButtonID="imgtxtRecParcelaVencimento"
                                                    Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                </asp:CalendarExtender>
                                                <asp:RequiredFieldValidator ControlToValidate="txtRecParcelaVencimento" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvtxtRecParcelaVencimento" Display="None" runat="server" ValidationGroup="recParcelar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vcetxtRecParcelaVencimento" runat="server" TargetControlID="rfvtxtRecParcelaVencimento">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                            <div class="FormDiv">
                                                <asp:Button runat="server" ID="btnRecParcela" Text="Parcelar" OnClick="btnRecParcela_click"
                                                    ValidationGroup="recParcelar" />
                                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtender2Rec" runat="server" TargetControlID="btnRecParcela"
                                                    ConfirmText="Confirma o parcelamento dos T&iacute;tulo&nbsp;a&nbsp;Pagar?">
                                                </asp:ConfirmButtonExtender>
                                            </div>
                                            <div class="FormDiv">
                                                <asp:Button runat="server" ID="btnRecParcelaLimpar" OnClick="btnRecParcelaLimpar_click"
                                                    Text="Limpa Parcelamento" />
                                            </div>
                                        </div>
                                        <br />
                                        <br />
                                        <br />
                                        <hr />
                                        <div>
                                            <asp:ImageButton ID="imgbRecParcelasAlterar" runat="server" OnClick="imgbRecParcelasAlterar_Click"
                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/salvar.png" ToolTip="Salvar&nbsp;edi&ccedil;&atilde;o&nbsp;da&nbsp;parcela" />
                                            <asp:Label runat="server" ID="lblRecParcelamentoValorTotal" Text="Valor Total: " />
                                            <asp:GridView ID="gvRecParcelamentoResultado" runat="server" AutoGenerateColumns="False"
                                                CellPadding="1" ForeColor="#333333" OnRowDataBound="gvRecParcelamentoResultado_RowDataBound"
                                                EnableModelValidation="True">
                                                <Columns>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="imgbVisualizarRec" runat="server" OnClick="imgbVisualizarRec_Click"
                                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                                ToolTip="Abrir formul&aacute;rio completo" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="n&ordm;&nbsp;Parcela">
                                                        <ItemTemplate>
                                                            <asp:Label runat="server" ID="lblRecParcelamentoNumParcelar" Text='<%# Container.DataItemIndex+1 %>' />
                                                            <asp:HiddenField ID="hfRecParcelamentoIdTitrec" runat="server" Value='<%#Eval("PKString") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Documento">
                                                        <ItemTemplate>
                                                            <asp:TextBox runat="server" ID="txtRecParcelamentoNrDoc" Text='<%#Eval("nrDoc") %>'
                                                                ValidationGroup='<%#"parcela" + Eval("PKString") %>' MaxLength="17" Width="112"
                                                                ForeColor="DarkBlue" Font-Bold="True" />
                                                            <asp:RequiredFieldValidator ControlToValidate="txtRecParcelamentoNrDoc" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtRecParcelamentoNrDoc" Display="None" runat="server" ValidationGroup='<%#"parcela" + Eval("PKString") %>'></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtRecParcelamentoNrDoc" runat="server" TargetControlID="rfvtxtRecParcelamentoNrDoc">
                                                            </asp:ValidatorCalloutExtender>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Data&nbsp;de&nbsp;Vencimento">
                                                        <ItemTemplate>
                                                            <asp:TextBox runat="server" ID="txtRecParcelamentoVencimento" Text='<%#String.Format("{0:d}", Eval("vcto")) %>'
                                                                ValidationGroup='<%#"parcela" + Eval("PKString") %>' MaxLength="10" Width="80px"
                                                                onkeypress="MascaraData();" onblur="validaData();" ForeColor="DarkBlue" Font-Bold="True"></asp:TextBox>
                                                            <asp:ImageButton ID="imgtxtRecParcelamentoVencimento" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                                            <asp:CalendarExtender ID="cetxtRecParcelamentoVencimento" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                                                Enabled="True" TargetControlID="txtRecParcelamentoVencimento" PopupButtonID="imgtxtRecParcelamentoVencimento"
                                                                Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy">
                                                            </asp:CalendarExtender>
                                                            <asp:RequiredFieldValidator ControlToValidate="txtRecParcelamentoVencimento" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                                ID="rfvtxtRecParcelamentoVencimento" Display="None" runat="server" ValidationGroup='<%#"parcela" + Eval("PKString") %>'></asp:RequiredFieldValidator>
                                                            <asp:ValidatorCalloutExtender ID="vcetxtRecParcelamentoVencimento" runat="server"
                                                                TargetControlID="rfvtxtRecParcelamentoVencimento">
                                                            </asp:ValidatorCalloutExtender>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Valor&nbsp;do&nbsp;T&iacute;tulo">
                                                        <ItemTemplate>
                                                            <asp:TextBox runat="server" ID="txtRecParcelamentoValor" Text='<%#Eval("valor") %>'
                                                                ValidationGroup='<%#"parcela" + Eval("PKString") %>' MaxLength="17" Width="112"
                                                                ForeColor="DarkBlue" Font-Bold="True" onkeypress="mascaraMoeda();" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                        </asp:TabContainer>
                        <!-- fim pagar sub categorias -->
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
